package com.hdoit.ares.logical.viewmodel.official;

import java.util.List;

import org.springframework.util.StringUtils;

import com.hdoit.ares.logical.official.model.ArticalClassify;
import com.hdoit.ares.selfcommon.enums.official.ArticalClassifyType;
import com.tennetcn.common.enums.BaseEnumConstant;

public class ArticalClassifyTree extends ArticalClassify{
	private List<ArticalClassifyTree> children;

	public List<ArticalClassifyTree> getChildren() {
		return children;
	}

	public void setChildren(List<ArticalClassifyTree> children) {
		this.children = children;
	}
	
	private String depth;
	
	public String getDepth() {
		return depth;
	}

	public void setDepth(String depth) {
		this.depth = depth;
	}
	
	private boolean expanded=true;

	public boolean isExpanded() {
		return expanded;
	}

	public void setExpanded(boolean expanded) {
		this.expanded = expanded;
	}
	
	@Override
	public String getType() {
		String type= super.getType();
		if(!StringUtils.isEmpty(type)){
			return BaseEnumConstant.getGivenEnumByVlue(ArticalClassifyType.class, type);
		}
		return type;
	}
}
